From 8392039dd76b0eb29b9bda92535c4a3cb4cbc1bb Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 17 Jun 2009 01:27:34 +0000 Subject: [PATCH] Sugar pill fixes for alleged x86-64 compiler bug. --- itracku.c | 6 +++--- wbt-200.c | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/itracku.c b/itracku.c index 493dfeab4..d23d91696 100644 --- a/itracku.c +++ b/itracku.c @@ -392,7 +392,7 @@ itracku_rd_ser_init(const char *fname) break; } dbg(1, "trying port %s", port); - if (fd = gbser_init(port), NULL == fd) { + if ((fd = gbser_init(port)) == NULL) { dbg(1, "port %s not available.", port); continue; } @@ -413,7 +413,7 @@ itracku_rd_ser_init(const char *fname) break; } dbg(1, "trying port %s", port); - if (fd = gbser_init(port), NULL == fd) { + if ((fd = gbser_init(port)) == NULL) { dbg(1, "port %s not available.", port); continue; } @@ -440,7 +440,7 @@ itracku_rd_ser_init(const char *fname) port = xstrdup(fname); dbg(1, "opening port %s", fname); - if (fd = gbser_init(port), NULL == fd) + if ((fd = gbser_init(port)) == NULL) { fatal(MYNAME ": can't initialise port \"%s\"", port); } diff --git a/wbt-200.c b/wbt-200.c index a4cfc8381..ab1e0d94b 100644 --- a/wbt-200.c +++ b/wbt-200.c @@ -197,10 +197,8 @@ static size_t buf_read(struct buf_head *h, void *data, size_t len) { static void buf_extend(struct buf_head *h, size_t amt) { struct buf_chunk *c; size_t sz = amt + sizeof(struct buf_chunk); - if (c = xmalloc(sz), NULL == c) { - fatal(MYNAME ": Can't allocate %lu bytes for buffer\n", (unsigned long) sz); - } + c = xmalloc(sz); c->next = NULL; c->size = amt; c->used = 0; @@ -374,7 +372,7 @@ static void rd_init(const char *fname) { port = xstrdup(fname); db(1, "Opening port...\n"); - if (fd = gbser_init(port), NULL == fd) { + if ((fd = gbser_init(port)) == NULL) { fatal(MYNAME ": Can't initialise port \"%s\"\n", port); } @@ -404,7 +402,7 @@ static int rd_buf(void *buf, int len) { static void file_init(const char *fname) { db(1, "Opening file...\n"); - if (fl = fopen(fname, "rb"), NULL == fl) { + if ((fl = fopen(fname, "rb")) == NULL) { fatal(MYNAME ": Can't open file '%s'\n", fname); } } -- 2.30.2